package backend

import (
	"github.com/gogf/gf/v2/frame/g"
)

type RotationCreateReq struct {
	g.Meta `path:"/backend/rotation/add" method:"post" tags:"轮播图" summary:"创建轮播图接口"`
	PicUrl string `json:"pic_url"`
	Link   string `json:"link"`
	Sort   int    `json:"sort"`
}
type RotationCreateRes struct {
	RotationId uint `json:"rotation_id"`
}

type RotationUpdateReq struct {
	g.Meta `path:"/backend/rotation/update/{Id}" method:"put" tags:"轮播图" summary:"修改轮播图接口"`
	Id     uint   `json:"id"      v:"min:1#请选择需要修改的轮播图" dc:"轮播图Id"`
	PicUrl string `json:"pic_url"`
	Link   string `json:"link"`
	Sort   int    `json:"sort"`
}
type RotationUpdateRes struct{}

type RotationDeleteReq struct {
	g.Meta `path:"/backend/rotation/delete" method:"delete" tags:"轮播图" summary:"删除轮播图接口"`
	Id     uint `v:"min:1#请选择需要删除的轮播图" dc:"轮播图id"`
}
type RotationDeleteRes struct{}

type RotationGetListCommonReq struct {
	g.Meta `path:"/backend/rotation/list" method:"get" tags:"轮播图" summary:"轮播图列表接口"`
	Sort   int `json:"sort" in:"query" dc:"轮播图排序"`
	CommonPaginationReq
}

type RotationGetListCommonRes struct {
	List  interface{} `json:"list" description:"列表"`
	Page  int         `json:"page" description:"分页码"`
	Size  int         `json:"size" description:"分页数量"`
	Total int         `json:"total" description:"数据总数"`
}
